package src.string;

/**
 * 字符串频繁修改的性能问题
 */
public class StringDemo04 {
    public static void main(String[] args) {
        String str = "a";
        for(int i=0;i<10000000;i++){
//            str = str + "a";
            str = new StringBuilder(str).append("a").toString();
        }

        System.out.println("执行完了！");
    }
}
